@echo off

setlocal EnableDelayedExpansion

rem get current base dir
set "currentDir=%~dp0"

rem change work dir
cd /d "%currentDir%"

rem use jre run app.jar
start "" "%~dp0jre\bin\java.exe" -Xms1024m -Xmx1024m -jar upload-0.0.1-SNAPSHOT.jar --spring.config.location="%~dp0config\application.yml" >nul 2>&1

echo Service started in the background
endlocal